/*
 * ColorFilas.java
 *
 * Created on 28 de junio de 2007, 03:17 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package everest3;

import java.awt.Color;
import java.awt.Component;
import javax.swing.JTable;
import javax.swing.table.TableCellRenderer;

/**
 *
 * @author Administrador
 */
public class ColorFilas extends JTable {    
    /** Creates a new instance of ColorFilas */
    public ColorFilas() {
    }
     public Component prepareRenderer(
                                TableCellRenderer renderer,
                                int row, int col) {
           Component c = super.prepareRenderer(renderer,
                                      row, col);
           if (row % 2 == 0 && !isCellSelected(row,col)) {
             c.setBackground(Color.LIGHT_GRAY);
           } else {
             c.setBackground(getBackground());
           }
           return c;
         }

   

}
